Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Anycubic Photon Mono X SLA printer and its native export format. #7917

Merged
merged 2 commits into from
Feb 14, 2022

Conversation

ole00
Copy link
Contributor

@ole00 ole00 commented Feb 13, 2022

This change adds support for Anycubic Photon Mono X SLA printer. Notable changes:

  • added RLE encoding raster common in Anycubic SLA printers
  • added new SLA export format (files with .pwmx extension) which is not based on zip archiver
  • added configuration files for Anycubic Photon Mono X SLA printer, so that it can be selected in Configuration Wizard

@bubnikv
Copy link
Collaborator

bubnikv commented Feb 14, 2022

Great, thanks!

@gudvinr
Copy link

gudvinr commented Jun 28, 2022

What about other files exported by Photon Workshop? If I'm not mistaken, other models use same file format but have different extensions. At least Photon Mono (pwmo) and Photon Mono 4k (pwma) should be compatible.

But I am not sure about pwmb (Photon Mono X 6K, likely compatible), pwms (Photon Mono SE), pmsq (Photon Mono SQ), pm3 (Photon M3) and pm3m (Photon M3 Max).

@gudvinr
Copy link

gudvinr commented Jun 28, 2022

@ole00 @rtyr can you consider adding something generic like PhotonWorkshopArchive or PWArchive and derive all extensions from there?

From what I see in uvtools it does exactly this and I don't see machine specific code apart from width/height definitions and name strings.

@bubnikv
Copy link
Collaborator

bubnikv commented Jun 28, 2022

can you consider adding something generic like PhotonWorkshopArchive or PWArchive and derive all extensions from there?

We are leaving it to contributors.

@ole00
Copy link
Contributor Author

ole00 commented Jun 28, 2022

@gudvinr - I think you are correct. Other Anycubic SLA printers use 'nearly' the same export format with some small but important differences (few bytes differences in the file header). The thing for me is I do own Mono X and I could physically print the exported .pwmx files on the printer. Therefore I had high confidence the exported files a) do not break the expensive printer and b) print the 3d model correctly. If you have a different Anycubic SLA printer, and you volunteer to test the exported files please let me know and I could try to support your printer (it would be good if you could compile the PrusaSlicer on your own as well, or you would be OK to use a Linux build at least for testing purposes).

@gudvinr
Copy link

gudvinr commented Jun 28, 2022

@ole00 I do have Photon Mono (2k) which I think is same gen as your Photon Mono X. And I could both build PS myself or use linux build.

Maybe we can do it this way. Since you already did most of the work and familiar with your codebase, can you create printer-agnostic class for writing PW-compatible files and derive your pwmx writer from it?
If you submit that as separate PR I can support my printer via another PR. This way we don't mess too much with codebase and it will be easier for future support if anyone request additional printer based on same file format.

Is this okay for you?

@properlypurple
Copy link

@ole00 I have a photon mono 4k, which uses pwma extension. I'm able to compile PS and test the output on the actual printer as well. If you need sliced pwma files for testing, I'm happy to provide those too.(And maybe we should move this to a new bug report)

@ole00
Copy link
Contributor Author

ole00 commented Jun 30, 2022

@properlypurple new bug report is a good idea. Feel free to add new comments here: ole00#1

@HerrBrain
Copy link

I have a Photon Mono SQ and have been using the PS→SL1→UVtools→PMSQ workflow on Arch Linux. @ole00 any idea what modifications are necessary?

@ole00
Copy link
Contributor Author

ole00 commented Sep 26, 2022

@HerrBrain you can try to compile the following fork: master...ole00:PrusaSlicer:sla_anyphoton_export2
It contains changes that support some other Photon Mono printers. Basically, if you could try to compile the fork and then modify resources/profiles/Anycubic.ini to add support for your printer. Check this commit (e50f188) that shows what was changed in order to add the new printers. Your printer requires files with extension .pmsq which is not currently recognised by the slicer code, so use an extension .pwmsq (use output_filename_format = [input_filename_base].pwmsq in the ini file). Also, .pmsq files seem to be Anycubic format 515 , so you should add the following option to printer_notes (ini variable): PRINTER_EXPORT_PWM_VER=515
Before printing you may need to rename the exported .pwmsq to .pmsq (or modify the slicer code: src/slic3r/GUI/GUI_App.cpp, line 473)

BTW. depending on your build environment you may need to revert my qhull commit: c11b224
which caused issues finding Qhull library on some computers (but fixed finding it on my computer - Xubuntu 18.04)

Edit: please note that the driver changes in my fork are experimental and were only tested (AFAIK) on Photon Mono X (tested by me). Be careful before you make your first physical printout and check the exported file is correct. You can use the Photon Workshop slicer to read the exported .pmsq file, you could try to use UVTools for verification, or use my pwmx_info tool (https://github.com/ole00/pwmx_info) for basic export format checks.

@Mimoja
Copy link
Contributor

Mimoja commented Mar 4, 2023

hi @ole00, I propose the addition of the Photon Mono and Mono SE in #9929 .
I add them as Version 1 printers instead of 515. As initial contributer would you mind having a look at those changes as I am refactoring your code quite a bit?

@ole00
Copy link
Contributor Author

ole00 commented Mar 8, 2023

Hi @Mimoja . I forgot about my branch completely. Was my second branch (sla_anyphoton_export2) already merged to master? Your pull request does not seem to contain some changes from my sla_anyphoton_export2 branch, so that's why I'm curious whether your new commits would work. Anyway, your changes look good to me (have not tried to compile them yet). Thanks for the tidy-up and improvements.

@Mimoja
Copy link
Contributor

Mimoja commented Mar 8, 2023

I found you branch after i did the work /0
So no, i don't incorporate any additional changes besides from what I needed to clean it up a bit for my personal liking to be able to add more Anycubic printers fast.
If it is okay for you I would start merging in your 515 changes unless you want to so do or want me to pull my PR completely

@ole00
Copy link
Contributor Author

ole00 commented Mar 9, 2023

Please start merging yourself. I'm happy with your PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants